package com.ruoyi.lhky.service;

import com.ruoyi.lhky.mapper.GroupMapper;
import com.ruoyi.lhky.pojo.Group;
import com.ruoyi.lhky.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class GroupService {

    @Autowired
    private GroupMapper groupMapper;

    public R getGroupName(Long groupId) {
        Group group = groupMapper.selectById(groupId);
        if (group == null) {
            return new R(false, "分组未找到");
        }
        return new R(true, group);
    }
}
